package com.jymj.entity.data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * Created by ljj on 2017/4/28.
 */
public class MoveCost implements Comparable, Serializable {

    private Integer costId;
    //序号
    private String count;
    //项目
    private String project;
    //工程量
    private BigDecimal quantitie;
    //工程量 单位
    private String quaunit;
    //计费单价
    private BigDecimal bilprice;
    //单价 单位
    private String unit;
    //总计（万元）
    private BigDecimal sumcost;
    //备注
    private String text;
    //上级id
    private Integer keyId;

    public Integer getCostId() {
        return costId;
    }

    public void setCostId(Integer costId) {
        this.costId = costId;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public String getProject() {
        return project;
    }

    public void setProject(String project) {
        this.project = project;
    }

    public BigDecimal getQuantitie() {
        return quantitie;
    }

    public void setQuantitie(BigDecimal quantitie) {
        this.quantitie = quantitie;
    }

    public BigDecimal getBilprice() {
        return bilprice;
    }

    public void setBilprice(BigDecimal bilprice) {
        this.bilprice = bilprice;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getSumcost() {
        return sumcost == null ? null : sumcost.setScale(2, RoundingMode.HALF_UP);
    }

    public void setSumcost(BigDecimal sumcost) {
        this.sumcost = sumcost;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Integer getKeyId() {
        return keyId;
    }

    public void setKeyId(Integer keyId) {
        this.keyId = keyId;
    }

    public String getQuaunit() {
        return quaunit;
    }

    public void setQuaunit(String quaunit) {
        this.quaunit = quaunit;
    }

    public int compareTo(Object o) {
        MoveCost m = (MoveCost) o;
        int c = m.getCostId();
        return this.costId.compareTo(c);
    }
}
